def read_file_safe(filename):
    try:
        with open(filename,"r") as f:
            content = f.read()
            return content
    except FileNotFoundError:
        print("文件不存在")
        return ""
    
def main():
    print(read_file_safe("poem.txt"))
    read_file_safe("shit.txt")

if __name__=="__main__":
    # read_file_safe("poem.txt")
    # read_file_safe("shit.txt")
    main()